import type { ProColumns } from '@ant-design/pro-table';
export type columnsDataType = {
  startTime: string;
  endTime: string;
  custName: string;
  custNo: string;
  email: string;
  mobile: string;
  disctNo: string;
  openDate: string;
  custStatus: string;
  pageNum: number;
  pageSize: number;
};
const columnsData: ProColumns<columnsDataType>[] = [
  // 配置搜索框
  {
    title: '账户编号',
    dataIndex: 'serialNo',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '客户编号',
    dataIndex: 'customerNo',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '租户ID',
    dataIndex: 'tenantId',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '账户类型',
    dataIndex: 'type',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '状态',
    dataIndex: 'status',
    valueType: 'select',
    hideInTable: true,
    valueEnum: {
      0: {
        text: '正常',
      },
      1: {
        text: '冻结',
      },
      2: {
        text: '注销',
      },
      3: {
        text: '未激活',
      },
    },
  },
  // {
  //   title: '注册日期',
  //   dataIndex: 'registerDate',
  //   valueType: 'dateRange',
  //   hideInTable: true,
  //   search: {
  //     transform: (value) => {
  //       return {
  //         startDate: value[0],
  //         endDate: value[1],
  //       };
  //     },
  //   },
  // },

  // table里面的内容
  {
    title: '账户编号',
    dataIndex: 'serialNo',
    hideInSearch: true,
    width: 165,
  },
  {
    title: '账户余额',
    dataIndex: 'balance',
    hideInSearch: true,
    width: 80,
  },
  {
    title: '冻结金额',
    dataIndex: 'freezeAmount',
    hideInSearch: true,
    width: 80,
  },
  {
    title: '账户类型',
    dataIndex: 'type',
    hideInSearch: true,
    valueType: 'select',
    width: 80,
    valueEnum: {
      0: {
        text: '个人账户',
      },
      1: {
        text: '企业账户',
      },
    },
  },
  {
    title: '币种',
    dataIndex: 'ccy',
    hideInSearch: true,
    width: 80,
  },
  {
    title: '客户编号',
    dataIndex: 'customerNo',
    hideInSearch: true,
    width: 165,
  },
  {
    title: '注册日期',
    dataIndex: 'createTime',
    valueType: 'dateTime',
    hideInSearch: true,
    width: 160,
  },
  {
    title: '账户状态',
    hideInSearch: true,
    dataIndex: 'status',
    valueType: 'select',
    width: 100,
    valueEnum: {
      0: {
        text: '正常',
        status: 'Success',
      },
      1: {
        text: '冻结',
        status: 'Error',
      },
      2: {
        text: '注销',
        status: 'Warning',
      },
      3: {
        text: '未激活',
        status: 'Default',
      },
    },
  },
  {
    title: '操作',
    dataIndex: 'action',
    hideInSearch: true,
    width: 200,
    fixed: 'right',
  },
];

export default columnsData;
